<?php

class SiteController extends FrontBaseC {

    //错误页面
    public function actionError() {
    	$this->layout = 'theme.views.layouts.FrontNoFixedContent';
        $code = (int) Yii::app()->errorHandler->error['code'];
        $this->assign('message', Yii::app()->errorHandler->error['message']);
        $this->assign('file', Yii::app()->errorHandler->error['file']);
        $this->assign('line', Yii::app()->errorHandler->error['line']);
        $this->assign('trace', Yii::app()->errorHandler->error['trace']);
        $this->assign('code', $code);
        switch ($code) {
            case 404:
                $this->render('error404');
                break;
            default:
                $this->render('error');
                break;
        }
    }

}
